import request from '@/utils/request'
import {HOST} from '@/constants'
import qs from 'qs'

export function pushMainComment(data) {
  return request({
    url: `${HOST}/comment/main/push`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function pushSubComment(data) {
  return request({
    url: `${HOST}/comment/sub/push`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function replySubComment(data) {
  return request({
    url: `${HOST}/comment/sub/reply`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function getMainReplyList(data) {
  return request({
    url: `${HOST}/comment/main/list/get`,
    method: 'get',
    params: data
  })
}

export function getSubReplyList(data) {
  return request({
    url: `${HOST}/comment/sub/list/get`,
    method: 'get',
    params: data
  })
}
